package qiongqi

import "fmt"

var (
	engine *QiongqiEngine
)

func InitQiongiFlowEngine() {
	parse := QiongqiXmlParser()
	e, err := new(QiongqiEngine).Init(parse)
	if err != nil {
		fmt.Println(err.Error())
	}
	engine = e
	// engine.Init(parse)
}

func LoadFile(name string) (*ParseResult, error) {
	return engine.LoadFile(name)
}

func LoadString(content string) (*ParseResult, error) {
	return engine.LoadString(content)
}

func DefaultEngine() *QiongqiEngine {
	return engine
}
